using Sirenix.OdinInspector;
using UnityEngine;

namespace MLTimeline.Demo
{
    public class TimelineControl : MonoBehaviour
    {
        public TimelinePlayer player;
        [PropertyRange(0, "@player.timeline.TotalFrames")]
        public int jumpFrame;
        [Button]
        private void Initialize()
        {
            player.Initialize();
        }

        [Button]
        private void Play()
        {
            player.Play();
        }
        [Button]
        private void Stop()
        {
            player.Stop();
        }
        [Button]
        private void Pause()
        {
            player.Pause();
        }
        [Button]
        public void JumpToFrame()
        {
            player.JumpToFrame(jumpFrame);
        }
    }
}